let obj = {
    a:12,
    b:5
}

console.log(obj.toString()); //[object Object]

console.log(JSON.stringify(obj)); //{"a":12,"b":5}

let str = `[
    {
        "name":"laowang",
        "age":18
    },
    {
        "name":"xiaoli",
        "age":19
    },
    {
        "name":"xiaogao",
        "age":20
    }
]`;

console.log(JSON.parse(str));
console.log(typeof JSON.parse(str));